package com.excel.service.impl;


import com.excel.entity.db.PubImpExcelJdLog;
import com.excel.mapper.PubImpExcelJdLogMapper;
import com.excel.service.IPubImpExcelJdLogService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 批量导入日志信息表（提供导入日志查询功能） 服务实现类
 * </p>
 *
 *  @author hc
 * 
 */
@Service
@Slf4j
@RequiredArgsConstructor
public class PubImpExcelJdLogServiceImpl implements IPubImpExcelJdLogService {


	@Resource
	private PubImpExcelJdLogMapper pubImpExcelJdLogMapper;

	@Override
	public Integer insert(PubImpExcelJdLog pubImpExcelJdLog) {
		return pubImpExcelJdLogMapper.insert(pubImpExcelJdLog);
	}

	@Override
	public Integer updateState(PubImpExcelJdLog pubImpExcelJdLog) {
		return pubImpExcelJdLogMapper.updateStateByPcNum(pubImpExcelJdLog);
	}

	@Override
	public List<PubImpExcelJdLog> selectIdsByRunningStatus(PubImpExcelJdLog pubImpExcelJdLog) {
		pubImpExcelJdLog.setState(1);
		return pubImpExcelJdLogMapper.select(pubImpExcelJdLog);
	}
}
